package cn.wolfcode.car.mapper;

import cn.wolfcode.car.domain.Employee;
import cn.wolfcode.car.domain.Permission;
import cn.wolfcode.car.domain.Role;
import cn.wolfcode.car.qo.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> selectForPage(EmployeeQueryObject qo);

    Employee getByUserName(String username);

    void deleteAll(@Param("ids") Long[] ids);

    List<Role> getRolesAndPermission(Long id);

    List<Permission> getPermission(Long id);

    List<Employee> listAll();

}